<?php
	class Action
	{
		public $page = null;
		
		// Setting '$silence' to 'true' will prevent this page from being displayed, however this script will be executed.
		//public $silence = true;
		
		public function __construct(&$page)
		{
			$this->page = &$page;
		}
		
		public function run()
		{
			// Session example
			// You can access it from the root OR declare it to a variable, this way is just to tidy the source up
			//$session = $this->page->core->session;
			
			// If 'name' doesn't exist, it's created on-the-fly.
			//$session->name = 'Bob';
			//$session->age = 17;
			//$session->country = 'USA';
			
			// Print the name
			// print $session->name;
			
			// You can delete multiple session variables in one delete
			//$session->del( 'name', 'age', 'country' );

			// SQL example with Interfaces
			// Note: There is currently no "generic" interface created
			// you must create your own interface, using the 'user' interface as a model.

			// initialize the "user" interface
			//$user = $this->page->core->db->getInterface('user');
			
			// using the user interface, load the user 'Bob'	
			//$user->load('Bob');
	
			// $loaded is true if the user was found
			//if($user->loaded)
			//{
				// Lets change the users name to 'Jason'
				//$user->name = 'Jason';
				//We are done here, lets update the record in the database
				//$user->update();
			//}
		}
	}
?>